package com.ruoyi.project.meal.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.meal.mapper.MealMapper;
import com.ruoyi.project.meal.domain.Meal;
import com.ruoyi.project.meal.service.IMealService;

/**
 * 充值套餐Service业务层处理
 * 
 * @author wyh
 * @date 2024-08-14
 */
@Service
public class MealServiceImpl implements IMealService 
{
    @Autowired
    private MealMapper mealMapper;

    /**
     * 查询充值套餐
     * 
     * @param id 充值套餐主键
     * @return 充值套餐
     */
    @Override
    public Meal selectMealById(Long id)
    {
        return mealMapper.selectMealById(id);
    }

    /**
     * 查询充值套餐列表
     * 
     * @param meal 充值套餐
     * @return 充值套餐
     */
    @Override
    public List<Meal> selectMealList(Meal meal)
    {
        return mealMapper.selectMealList(meal);
    }

    /**
     * 新增充值套餐
     * 
     * @param meal 充值套餐
     * @return 结果
     */
    @Override
    public int insertMeal(Meal meal)
    {
        return mealMapper.insertMeal(meal);
    }

    /**
     * 修改充值套餐
     * 
     * @param meal 充值套餐
     * @return 结果
     */
    @Override
    public int updateMeal(Meal meal)
    {
        return mealMapper.updateMeal(meal);
    }

    /**
     * 批量删除充值套餐
     * 
     * @param ids 需要删除的充值套餐主键
     * @return 结果
     */
    @Override
    public int deleteMealByIds(Long[] ids)
    {
        return mealMapper.deleteMealByIds(ids);
    }

    /**
     * 删除充值套餐信息
     * 
     * @param id 充值套餐主键
     * @return 结果
     */
    @Override
    public int deleteMealById(Long id)
    {
        return mealMapper.deleteMealById(id);
    }
}
